Data extraction and pre-analyses for the paper looking at BEI and equity. BEI comprise bike lanes and canopy changes while equity is measured through Pampalon deprivation index. (Partially adapted from original work on BEI bike lanes – see bike_lane_stats.R and ReadMe.md.)
Paper is available here.
General processing steps:
In a second phase, these BEI changes will be linked to Pampalon index for 2016 (and 2011 ?)
We use data categorized by Philippe Apparicio’s team who manually identified bike lanes for each census year since 1991. For this study, we limit ourselves to 2016 and 2011 census years.
On top of the original CT boundaries, three levels of buffer have been applied to the CT – 250m, 500m & 750m. Then the same series of processing steps (see above) have been applied to the buffers.
UPDATE 2021-12-02 Following discussion with @Yan, add normalized bike line changes:
# Bike lanes, from Ph. Apparicio
reseau <- st_read(dsn="data/ReseauCyclableFinal.gdb", layer = "Reseau") # Already in NAD83 / MTM zone 8
## Reading layer `Reseau' from data source
## `/Users/benoit/WORKSPACE/gentrification_BEI_equity/data/ReseauCyclableFinal.gdb'
## using driver `OpenFileGDB'
## Simple feature collection with 82166 features and 72 fields
## Geometry type: GEOMETRY
## Dimension: XYZ, XYZM
## Bounding box: xmin: 266985.5 ymin: 5029251 xmax: 320986.1 ymax: 5062652
## z_range: zmin: 0 zmax: 43
## m_range: mmin: 0 mmax: 43
## Projected CRS: NAD83 / MTM zone 8
bike_lane <- reseau %>%
filter(An2016 == 1 | An2011 == 1) %>%
select(IdRte, ClsRte, Zone, starts_with("An"), starts_with("Typo_")) %>%
st_cast("MULTILINESTRING") # Get rid of a few MULTICURVE geometries
# CT boundaries for Montreal
CT16 <- get_census(dataset='CA16', regions=list(CMA='24462'), level='CT', geo_format = "sf") %>%
filter(Type == "CT") %>%
mutate(interact_aoi = CD_UID %in% c(2466, 2465, 2458)) %>% # Flag Montréal island, Laval and the South shore (Longueuil, St-Lambert, Brossard)
st_transform(st_crs(bike_lane))
## Reading geo data from local cache.
CT11 <- get_census(dataset='CA11', regions=list(CMA='24462'), level='CT', geo_format = "sf") %>%
filter(Type == "CT") %>%
st_transform(st_crs(bike_lane))
## Reading geo data from local cache.
compute_bikelane_by_area <- function(sf_areas, year_fld, typo_fld) {
# Compute length of bike lanes within each area.
# --
# Parameters:
# - sf_areas: sf class object defining the areas of interest, must have a GeoUID field
# - year_fld: field name specifying the year of interest, e.g. An2016
# - typo_fld: field name specifying the typology for the year of interest, e.g. Typo_2016
year_fld <- enquo(year_fld)
typo_fld <- enquo(typo_fld)
# Compute intersection of bike lanes with areas
bk <- bike_lane %>%
filter(!!year_fld == 1) %>%
st_intersection(sf_areas) %>%
mutate(bike_lane_length = st_length(.)) %>%
as.data.frame() %>%
group_by(GeoUID, !!typo_fld) %>%
summarise(bike_lane_length = sum(bike_lane_length)) %>%
ungroup() %>%
pivot_wider(names_from = !!typo_fld, names_prefix = "Bike_class", names_sort = TRUE,
values_from = bike_lane_length, values_fill = units::set_units(0, m)) %>%
mutate(Bike_lane_total = units::set_units(rowSums(select(., starts_with("Bike_class"))), m))
# Merge back into original sf_areas
bk <- sf_areas %>%
left_join(bk)
# Replace NA by 0, which occur in Bike_class length
bk[is.na(bk)] <- 0
return(bk)
}
compute_streetlength_by_area <- function(sf_areas) {
# Compute length of streets within each area.
# --
# Parameters:
# - sf_areas: sf class object defining the areas of interest, must have a GeoUID field
# Compute intersection of streets with areas
bk <- reseau %>%
st_cast("MULTILINESTRING") %>% # Get rid of a few MULTICURVE geometries
st_intersection(sf_areas) %>%
mutate(street_length = st_length(.)) %>%
as.data.frame() %>%
group_by(GeoUID) %>%
summarise(street_length = sum(street_length)) %>%
ungroup()
# Merge back into original sf_areas
bk <- sf_areas %>%
mutate(shape_area_km2 = units::set_units(st_area(.), 'km^2')) %>%
left_join(bk)
# Replace NA by 0
bk[is.na(bk)] <- 0
return(bk)
}
# Compute year 2016 and year 2011 bike lanes within 2016 CTs
# NB: contrary to the original work, we keep the same area of reference, i.e. 2016
bike_lane_by_CT16 <- compute_bikelane_by_area(CT16, An2016, Typo_2016)
bike_lane_by_CT11 <- compute_bikelane_by_area(CT16, An2011, Typo_2011)
# Compute buffers, with 3 radii and for each census year
radii <- c(250, 500, 750)
buf_CT16 <- lapply(radii, st_buffer, x=CT16)
names(buf_CT16) <- lapply(radii, function(b) {paste0("buf", b)})
# Compute bike length for each buffer/census year
buf_CT16_w_bike_length <- lapply(buf_CT16, compute_bikelane_by_area, year_fld=An2016, typo_fld=Typo_2016)
names(buf_CT16_w_bike_length) <- lapply(radii, function(b) {paste0("buf", b)})
buf_CT16_w_bike_length$original <- bike_lane_by_CT16
buf_CT11_w_bike_length <- lapply(buf_CT16, compute_bikelane_by_area, year_fld=An2011, typo_fld=Typo_2011)
names(buf_CT11_w_bike_length) <- lapply(radii, function(b) {paste0("buf", b)})
buf_CT11_w_bike_length$original <- bike_lane_by_CT11
# Compute total street length within CT/buffer
street_length_by_CT16 <- compute_streetlength_by_area(CT16)
buf_CT16_street_length <- lapply(buf_CT16, compute_streetlength_by_area)
names(buf_CT16_street_length) <- lapply(radii, function(b) {paste0("buf", b)})
buf_CT16_street_length$original <- street_length_by_CT16
# Reorganize data to have all data in one dataframe
bike_lane_changes <- CT16 %>%
left_join(select(as.data.frame(buf_CT16_street_length$original), GeoUID, street_length, shape_area_km2), by="GeoUID") %>%
left_join(select(as.data.frame(buf_CT16_street_length$buf250), GeoUID, street_length, shape_area_km2), by="GeoUID", suffix=c(".ct", ".b250")) %>%
left_join(select(as.data.frame(buf_CT16_street_length$buf500), GeoUID, street_length, shape_area_km2), by="GeoUID") %>%
left_join(select(as.data.frame(buf_CT16_street_length$buf750), GeoUID, street_length, shape_area_km2), by="GeoUID", suffix=c(".b500", ".b750")) %>%
left_join(select(as.data.frame(buf_CT16_w_bike_length$original), GeoUID, starts_with("Bike_")), by="GeoUID") %>%
left_join(select(as.data.frame(buf_CT11_w_bike_length$original), GeoUID, starts_with("Bike_")), by="GeoUID", suffix=c(".2016ct", ".2011ct")) %>%
left_join(select(as.data.frame(buf_CT16_w_bike_length$buf250), GeoUID, starts_with("Bike_")), by="GeoUID") %>%
left_join(select(as.data.frame(buf_CT11_w_bike_length$buf250), GeoUID, starts_with("Bike_")), by="GeoUID", suffix=c(".2016b250", ".2011b250")) %>%
left_join(select(as.data.frame(buf_CT16_w_bike_length$buf500), GeoUID, starts_with("Bike_")), by="GeoUID") %>%
left_join(select(as.data.frame(buf_CT11_w_bike_length$buf500), GeoUID, starts_with("Bike_")), by="GeoUID", suffix=c(".2016b500", ".2011b500")) %>%
left_join(select(as.data.frame(buf_CT16_w_bike_length$buf750), GeoUID, starts_with("Bike_")), by="GeoUID") %>%
left_join(select(as.data.frame(buf_CT11_w_bike_length$buf750), GeoUID, starts_with("Bike_")), by="GeoUID", suffix=c(".2016b750", ".2011b750"))
# Compute change between 2011 and 2016 (only for total bike lane length)
bike_lane_changes <- bike_lane_changes %>%
mutate(Bike_lane_diff.2011.2016ct = Bike_lane_total.2016ct - Bike_lane_total.2011ct,
Bike_lane_diff.2011.2016b250 = Bike_lane_total.2016b250 - Bike_lane_total.2011b250,
Bike_lane_diff.2011.2016b500 = Bike_lane_total.2016b500 - Bike_lane_total.2011b500,
Bike_lane_diff.2011.2016b750 = Bike_lane_total.2016b750 - Bike_lane_total.2011b750)
# Normalize bike lane change by (i) street length and (ii) area
bike_lane_changes <- bike_lane_changes %>%
mutate(Bike_lane_diff.by.street.2011.2016ct = Bike_lane_diff.2011.2016ct / street_length.ct,
Bike_lane_diff.by.street.2011.2016b250 = Bike_lane_diff.2011.2016b250 / street_length.b250,
Bike_lane_diff.by.street.2011.2016b500 = Bike_lane_diff.2011.2016b500 / street_length.b500,
Bike_lane_diff.by.street.2011.2016b750 = Bike_lane_diff.2011.2016b750 / street_length.b750,
Bike_lane_diff.by.area.2011.2016ct = Bike_lane_diff.2011.2016ct / shape_area_km2.ct,
Bike_lane_diff.by.area.2011.2016b250 = Bike_lane_diff.2011.2016b250 / shape_area_km2.b250,
Bike_lane_diff.by.area.2011.2016b500 = Bike_lane_diff.2011.2016b500 / shape_area_km2.b500,
Bike_lane_diff.by.area.2011.2016b750 = Bike_lane_diff.2011.2016b750 / shape_area_km2.b750)
# Save results
st_write(bike_lane_changes, dsn = "data/bike_length_changes.gpkg", delete_layer = TRUE)
## Deleting layer `bike_length_changes' using driver `GPKG'
## Writing layer `bike_length_changes' to data source
## `data/bike_length_changes.gpkg' using driver `GPKG'
## Writing 970 features with 96 fields and geometry type Multi Polygon.
# Clean up
rm(buf_CT16)
rm(bike_lane_by_CT11, bike_lane_by_CT16)
rm(buf_CT11_w_bike_length, buf_CT16_w_bike_length)
rm(street_length_by_CT16, buf_CT16_street_length)
Check output for one specific dataset (Census tracts 2016, no buffer)
ggplot() +
geom_sf(data=filter(bike_lane_changes, interact_aoi), mapping = aes(fill=as.numeric(Bike_lane_total.2016ct)), lwd=0) +
scale_fill_continuous(name = "Total length (m)")+
labs(title = "Length of bike lanes within 2016 CTs", subtitle = "(INTERACT study area || for control only)")
ggplot() +
geom_sf(data=filter(bike_lane_changes, interact_aoi), mapping = aes(fill=as.numeric(Bike_lane_diff.2011.2016ct)), lwd=0) +
scale_fill_gradient2(name = "Length (m)")+
labs(title = "Changes in bike lane between 2011 and 2016", subtitle = "(INTERACT study area || CT level || for control only)")
ggplot() +
geom_sf(data=filter(bike_lane_changes, interact_aoi), mapping = aes(fill=as.numeric(Bike_lane_diff.by.street.2011.2016ct)), lwd=0) +
scale_fill_gradient2(name = "Ratio")+
labs(title = "Changes in bike lane between 2011 and 2016, normalized by street", subtitle = "(INTERACT study area || CT level || for control only)")
ggplot() +
geom_sf(data=filter(bike_lane_changes, interact_aoi), mapping = aes(fill=as.numeric(Bike_lane_diff.by.area.2011.2016ct)), lwd=0) +
scale_fill_gradient2(name = "Ratio (1/km)")+
labs(title = "Changes in bike lane between 2011 and 2016, normalized by area", subtitle = "(INTERACT study area || CT level || for control only)")
# CT level
ggplot(bike_lane_changes) +
geom_histogram(aes(as.numeric(Bike_lane_diff.2011.2016ct)), binwidth = 250) +
xlab("Difference of bike lane length between 2016 and 2011 | CT level")
summary(bike_lane_changes$Bike_lane_diff.2011.2016ct)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -1377.7 0.0 0.0 262.1 189.7 14463.8
ggplot(bike_lane_changes) +
geom_histogram(aes(as.numeric(Bike_lane_diff.by.street.2011.2016ct))) +
xlab("Difference of bike lane length between 2016 and 2011, normalized by street")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 252 rows containing non-finite values (stat_bin).
summary(bike_lane_changes$Bike_lane_diff.by.street.2011.2016ct)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## -1.00000 0.00000 0.00000 0.03665 0.04496 1.00000 252
ggplot(bike_lane_changes) +
geom_histogram(aes(as.numeric(Bike_lane_diff.by.area.2011.2016ct))) +
xlab("Difference of bike lane length between 2016 and 2011, normalized by area")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
summary(bike_lane_changes$Bike_lane_diff.by.area.2011.2016ct)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -1.1474 0.0000 0.0000 0.4237 0.1764 8.9852
# buf250 level
ggplot(bike_lane_changes) +
geom_histogram(aes(as.numeric(Bike_lane_diff.2011.2016b250)), binwidth = 250) +
xlab("Difference of bike lane length between 2016 and 2011 | buf 250m")
summary(bike_lane_changes$Bike_lane_diff.2011.2016b250)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -3452.5 0.0 0.0 646.7 933.8 20786.8
ggplot(bike_lane_changes) +
geom_histogram(aes(as.numeric(Bike_lane_diff.by.street.2011.2016b250))) +
xlab("Difference of bike lane length between 2016 and 2011, normalized by street")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 233 rows containing non-finite values (stat_bin).
summary(bike_lane_changes$Bike_lane_diff.by.street.2011.2016b250)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## -0.38580 0.00000 0.00854 0.03317 0.04904 0.56659 233
ggplot(bike_lane_changes) +
geom_histogram(aes(as.numeric(Bike_lane_diff.by.area.2011.2016b250))) +
xlab("Difference of bike lane length between 2016 and 2011, normalized by area")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
summary(bike_lane_changes$Bike_lane_diff.by.area.2011.2016b250)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -1.4622 0.0000 0.0000 0.4001 0.4306 6.2156
# buf500 level
ggplot(bike_lane_changes) +
geom_histogram(aes(as.numeric(Bike_lane_diff.2011.2016b500)), binwidth = 250) +
xlab("Difference of bike lane length between 2016 and 2011 | buf 500m")
summary(bike_lane_changes$Bike_lane_diff.2011.2016b250)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -3452.5 0.0 0.0 646.7 933.8 20786.8
ggplot(bike_lane_changes) +
geom_histogram(aes(as.numeric(Bike_lane_diff.by.street.2011.2016b500))) +
xlab("Difference of bike lane length between 2016 and 2011, normalized by street")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 229 rows containing non-finite values (stat_bin).
summary(bike_lane_changes$Bike_lane_diff.by.street.2011.2016b500)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## -0.26891 0.00000 0.01385 0.03298 0.05323 0.22121 229
ggplot(bike_lane_changes) +
geom_histogram(aes(as.numeric(Bike_lane_diff.by.area.2011.2016b500))) +
xlab("Difference of bike lane length between 2016 and 2011, normalized by area")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
summary(bike_lane_changes$Bike_lane_diff.by.area.2011.2016b500)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -0.94397 0.00000 0.03393 0.38745 0.49370 4.00417
# buf750 level
ggplot(bike_lane_changes) +
geom_histogram(aes(as.numeric(Bike_lane_diff.2011.2016b750)), binwidth = 250) +
xlab("Difference of bike lane length between 2016 and 2011 | buf 750m")
summary(bike_lane_changes$Bike_lane_diff.2011.2016b750)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -3697.5 0.0 578.6 1842.2 2928.6 29325.1
ggplot(bike_lane_changes) +
geom_histogram(aes(as.numeric(Bike_lane_diff.by.street.2011.2016b750))) +
xlab("Difference of bike lane length between 2016 and 2011, normalized by street")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 222 rows containing non-finite values (stat_bin).
summary(bike_lane_changes$Bike_lane_diff.by.street.2011.2016b750)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## -0.04758 0.00142 0.01779 0.03296 0.05205 0.22545 222
ggplot(bike_lane_changes) +
geom_histogram(aes(as.numeric(Bike_lane_diff.by.area.2011.2016b750))) +
xlab("Difference of bike lane length between 2016 and 2011, normalized by area")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
summary(bike_lane_changes$Bike_lane_diff.by.area.2011.2016b750)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -0.59760 0.00000 0.07793 0.38166 0.53774 3.95463
Canopy changes is based on data produced by CMM, using multispectral aerial imagery and lidar. In order to sync the observations with the census years, we focus on 2011 and 2019 with one extra observation point in 2015.
The processing steps are similar to the ones for the bike lanes:
# Codes du raster "espace vert"
# 0. No data (hors CMM)
# 1. NDVI < 0,3 et MNH < 3,0m = Minéral bas (route, stationnement, etc.)
# 2. NDVI < 0,3 et MNH ≥ 3,0m = Minéral haut (constructions)
# 3. NDVI ≥ 0,3 et MNH < 3,0m = Végétal bas (culture, gazon, etc.)
# 4. NDVI ≥ 0,3 et MNH ≥ 3,0m = Végétal haut (canopée)
# 5. Aquatique
# Load rasters into pg database for further processing
system("psql -d xgentrif_bei -c 'CREATE EXTENSION IF NOT EXISTS postgis'")
system("psql -d xgentrif_bei -c 'CREATE EXTENSION IF NOT EXISTS postgis_raster'")
if (nrow(dbGetQuery(con_bei, "SELECT 1 test WHERE to_regclass('canopee2019') IS NOT NULL;")) == 0) {
system("raster2pgsql -s 32188 -I -C -M data/canopy/2019/*.tif -F -t 1000x1000 canopee2019 | psql -d xgentrif_bei", intern = TRUE)
} else { message("PG Raster 'canopee2019' already imported") }
## PG Raster 'canopee2019' already imported
if (nrow(dbGetQuery(con_bei, "SELECT 1 test WHERE to_regclass('canopee2015') IS NOT NULL;")) == 0) {
system("raster2pgsql -s 32188 -I -C -M data/canopy/2015/*.tif -F -t 1000x1000 canopee2015 | psql -d xgentrif_bei", intern = TRUE)
} else { message("PG Raster 'canopee2015' already imported") }
## PG Raster 'canopee2015' already imported
if (nrow(dbGetQuery(con_bei, "SELECT 1 test WHERE to_regclass('canopee2011') IS NOT NULL;")) == 0) {
system("raster2pgsql -s 32188 -I -C -M data/canopy/2011/*.tif -F -t 1000x1000 canopee2011 | psql -d xgentrif_bei", intern = TRUE)
} else { message("PG Raster 'canopee2011' already imported") }
## PG Raster 'canopee2011' already imported
# Resample to 10m as the original rasters have a 1m resolution, which is too high to allow for a swift processing
if (nrow(dbGetQuery(con_bei, "SELECT 1 test WHERE to_regclass('canopee2019_10m') IS NOT NULL;")) == 0) {
system("gdal_translate -of GTiff PG:\"host=localhost dbname=xgentrif_bei table=canopee2019 mode=2\" -r mode -tr 10 10 data/canopy/canopee2019_10m.tif")
system("raster2pgsql -s 32188 -I -C -M data/canopy/canopee2019_10m.tif -F -t 100x100 canopee2019_10m | psql -d xgentrif_bei")
} else { message("PG Raster 'canopee2019_10m' already imported") }
## PG Raster 'canopee2019_10m' already imported
if (nrow(dbGetQuery(con_bei, "SELECT 1 test WHERE to_regclass('canopee2015_10m') IS NOT NULL;")) == 0) {
system("gdal_translate -of GTiff PG:\"host=localhost dbname=xgentrif_bei table=canopee2015 mode=2\" -r mode -tr 10 10 data/canopy/canopee2015_10m.tif")
system("raster2pgsql -s 32188 -I -C -M data/canopy/canopee2015_10m.tif -F -t 100x100 canopee2015_10m | psql -d xgentrif_bei")
} else { message("PG Raster 'canopee2015_10m' already imported") }
## PG Raster 'canopee2015_10m' already imported
if (nrow(dbGetQuery(con_bei, "SELECT 1 test WHERE to_regclass('canopee2011_10m') IS NOT NULL;")) == 0) {
system("gdal_translate -of GTiff PG:\"host=localhost dbname=xgentrif_bei table=canopee2011 mode=2\" -r mode -tr 10 10 data/canopy/canopee2011_10m.tif")
system("raster2pgsql -s 32188 -I -C -M data/canopy/canopee2011_10m.tif -F -t 100x100 canopee2011_10m | psql -d xgentrif_bei")
} else { message("PG Raster 'canopee2011_10m' already imported") }
## PG Raster 'canopee2011_10m' already imported
# Push CT16 to pg
if (nrow(dbGetQuery(con_bei, "SELECT 1 test WHERE to_regclass('ct16') IS NOT NULL;")) == 0) {
CT16 %>%
st_transform(crs = 32188) %>%
st_write(con_bei, "ct16",
layer_options = c("OVERWRITE=yes", "LAUNDER=true", "SPATIAL_INDEX=gist", "GEOMETRY_NAME=geom"))
system("psql -d xgentrif_bei -c 'CREATE INDEX ON ct16 USING gist (geometry)'")
} else { message("PG Layer CT16 already imported") }
## PG Layer CT16 already imported
WITH cnt19 AS (
SELECT "GeoUID"
,(pvc).value, SUM((pvc).count) As total
FROM (SELECT "GeoUID"
,ST_ValueCount(ST_Clip(rast, geometry)) As pvc
FROM canopee2019_10m
JOIN ct16 ON ST_Intersects(geometry, rast)
) As foo
GROUP BY "GeoUID", (pvc).value
),
canopee19 AS (
SELECT "GeoUID"
,round(100. * sum(total) FILTER (WHERE value in (3, 4)) / sum(total), 2) AS pct_esp_vert_2019
FROM cnt19
WHERE value > 0 -- discard no data, including postgis raster no data
GROUP BY "GeoUID"
),
cnt15 AS (
SELECT "GeoUID"
,(pvc).value, SUM((pvc).count) As total
FROM (SELECT "GeoUID"
,ST_ValueCount(ST_Clip(rast, geometry)) As pvc
FROM canopee2015_10m
JOIN ct16 ON ST_Intersects(geometry, rast)
) As foo
GROUP BY "GeoUID", (pvc).value
),
canopee15 AS (
SELECT "GeoUID"
,round(100. * sum(total) FILTER (WHERE value in (3, 4)) / sum(total), 2) AS pct_esp_vert_2015
FROM cnt15
WHERE value > 0 -- discard no data, including postgis raster no data
GROUP BY "GeoUID"
),
cnt11 AS (
SELECT "GeoUID"
,(pvc).value, SUM((pvc).count) As total
FROM (SELECT "GeoUID"
,ST_ValueCount(ST_Clip(rast, geometry)) As pvc
FROM canopee2011_10m
JOIN ct16 ON ST_Intersects(geometry, rast)
) As foo
GROUP BY "GeoUID", (pvc).value
),
canopee11 AS (
SELECT "GeoUID"
,round(100. * sum(total) FILTER (WHERE value in (3, 4)) / sum(total), 2) AS pct_esp_vert_2011
FROM cnt11
WHERE value > 0 -- discard no data, including postgis raster no data
GROUP BY "GeoUID"
)
SELECT "GeoUID"
,st_area(geometry) ct_area_m2
,coalesce(pct_esp_vert_2011, 0) pct_esp_vert_2011
,coalesce(pct_esp_vert_2015, 0) pct_esp_vert_2015
,coalesce(pct_esp_vert_2019, 0) pct_esp_vert_2019
FROM ct16
FULL JOIN canopee19 USING ("GeoUID")
FULL JOIN canopee15 USING ("GeoUID")
FULL JOIN canopee11 USING ("GeoUID");
WITH ct16 AS (
select "GeoUID", ST_Buffer(geometry, 250) geometry
from ct16
),
cnt19 AS (
SELECT "GeoUID"
,(pvc).value, SUM((pvc).count) As total
FROM (SELECT "GeoUID"
,ST_ValueCount(ST_Clip(rast, geometry)) As pvc
FROM canopee2019_10m
JOIN ct16 ON ST_Intersects(geometry, rast)
) As foo
GROUP BY "GeoUID", (pvc).value
),
canopee19 AS (
SELECT "GeoUID"
,round(100. * sum(total) FILTER (WHERE value in (3, 4)) / sum(total), 2) AS pct_esp_vert_2019
FROM cnt19
WHERE value > 0 -- discard no data, including postgis raster no data
GROUP BY "GeoUID"
),
cnt15 AS (
SELECT "GeoUID"
,(pvc).value, SUM((pvc).count) As total
FROM (SELECT "GeoUID"
,ST_ValueCount(ST_Clip(rast, geometry)) As pvc
FROM canopee2015_10m
JOIN ct16 ON ST_Intersects(geometry, rast)
) As foo
GROUP BY "GeoUID", (pvc).value
),
canopee15 AS (
SELECT "GeoUID"
,round(100. * sum(total) FILTER (WHERE value in (3, 4)) / sum(total), 2) AS pct_esp_vert_2015
FROM cnt15
WHERE value > 0 -- discard no data, including postgis raster no data
GROUP BY "GeoUID"
),
cnt11 AS (
SELECT "GeoUID"
,(pvc).value, SUM((pvc).count) As total
FROM (SELECT "GeoUID"
,ST_ValueCount(ST_Clip(rast, geometry)) As pvc
FROM canopee2011_10m
JOIN ct16 ON ST_Intersects(geometry, rast)
) As foo
GROUP BY "GeoUID", (pvc).value
),
canopee11 AS (
SELECT "GeoUID"
,round(100. * sum(total) FILTER (WHERE value in (3, 4)) / sum(total), 2) AS pct_esp_vert_2011
FROM cnt11
WHERE value > 0 -- discard no data, including postgis raster no data
GROUP BY "GeoUID"
)
SELECT "GeoUID"
,st_area(geometry) ct_area_m2
,coalesce(pct_esp_vert_2011, 0) pct_esp_vert_2011
,coalesce(pct_esp_vert_2015, 0) pct_esp_vert_2015
,coalesce(pct_esp_vert_2019, 0) pct_esp_vert_2019
FROM ct16
FULL JOIN canopee19 USING ("GeoUID")
FULL JOIN canopee15 USING ("GeoUID")
FULL JOIN canopee11 USING ("GeoUID");
WITH ct16 AS (
select "GeoUID", ST_Buffer(geometry, 500) geometry
from ct16
),
cnt19 AS (
SELECT "GeoUID"
,(pvc).value, SUM((pvc).count) As total
FROM (SELECT "GeoUID"
,ST_ValueCount(ST_Clip(rast, geometry)) As pvc
FROM canopee2019_10m
JOIN ct16 ON ST_Intersects(geometry, rast)
) As foo
GROUP BY "GeoUID", (pvc).value
),
canopee19 AS (
SELECT "GeoUID"
,round(100. * sum(total) FILTER (WHERE value in (3, 4)) / sum(total), 2) AS pct_esp_vert_2019
FROM cnt19
WHERE value > 0 -- discard no data, including postgis raster no data
GROUP BY "GeoUID"
),
cnt15 AS (
SELECT "GeoUID"
,(pvc).value, SUM((pvc).count) As total
FROM (SELECT "GeoUID"
,ST_ValueCount(ST_Clip(rast, geometry)) As pvc
FROM canopee2015_10m
JOIN ct16 ON ST_Intersects(geometry, rast)
) As foo
GROUP BY "GeoUID", (pvc).value
),
canopee15 AS (
SELECT "GeoUID"
,round(100. * sum(total) FILTER (WHERE value in (3, 4)) / sum(total), 2) AS pct_esp_vert_2015
FROM cnt15
WHERE value > 0 -- discard no data, including postgis raster no data
GROUP BY "GeoUID"
),
cnt11 AS (
SELECT "GeoUID"
,(pvc).value, SUM((pvc).count) As total
FROM (SELECT "GeoUID"
,ST_ValueCount(ST_Clip(rast, geometry)) As pvc
FROM canopee2011_10m
JOIN ct16 ON ST_Intersects(geometry, rast)
) As foo
GROUP BY "GeoUID", (pvc).value
),
canopee11 AS (
SELECT "GeoUID"
,round(100. * sum(total) FILTER (WHERE value in (3, 4)) / sum(total), 2) AS pct_esp_vert_2011
FROM cnt11
WHERE value > 0 -- discard no data, including postgis raster no data
GROUP BY "GeoUID"
)
SELECT "GeoUID"
,st_area(geometry) ct_area_m2
,coalesce(pct_esp_vert_2011, 0) pct_esp_vert_2011
,coalesce(pct_esp_vert_2015, 0) pct_esp_vert_2015
,coalesce(pct_esp_vert_2019, 0) pct_esp_vert_2019
FROM ct16
FULL JOIN canopee19 USING ("GeoUID")
FULL JOIN canopee15 USING ("GeoUID")
FULL JOIN canopee11 USING ("GeoUID");
WITH ct16 AS (
select "GeoUID", ST_Buffer(geometry, 750) geometry
from ct16
),
cnt19 AS (
SELECT "GeoUID"
,(pvc).value, SUM((pvc).count) As total
FROM (SELECT "GeoUID"
,ST_ValueCount(ST_Clip(rast, geometry)) As pvc
FROM canopee2019_10m
JOIN ct16 ON ST_Intersects(geometry, rast)
) As foo
GROUP BY "GeoUID", (pvc).value
),
canopee19 AS (
SELECT "GeoUID"
,round(100. * sum(total) FILTER (WHERE value in (3, 4)) / sum(total), 2) AS pct_esp_vert_2019
FROM cnt19
WHERE value > 0 -- discard no data, including postgis raster no data
GROUP BY "GeoUID"
),
cnt15 AS (
SELECT "GeoUID"
,(pvc).value, SUM((pvc).count) As total
FROM (SELECT "GeoUID"
,ST_ValueCount(ST_Clip(rast, geometry)) As pvc
FROM canopee2015_10m
JOIN ct16 ON ST_Intersects(geometry, rast)
) As foo
GROUP BY "GeoUID", (pvc).value
),
canopee15 AS (
SELECT "GeoUID"
,round(100. * sum(total) FILTER (WHERE value in (3, 4)) / sum(total), 2) AS pct_esp_vert_2015
FROM cnt15
WHERE value > 0 -- discard no data, including postgis raster no data
GROUP BY "GeoUID"
),
cnt11 AS (
SELECT "GeoUID"
,(pvc).value, SUM((pvc).count) As total
FROM (SELECT "GeoUID"
,ST_ValueCount(ST_Clip(rast, geometry)) As pvc
FROM canopee2011_10m
JOIN ct16 ON ST_Intersects(geometry, rast)
) As foo
GROUP BY "GeoUID", (pvc).value
),
canopee11 AS (
SELECT "GeoUID"
,round(100. * sum(total) FILTER (WHERE value in (3, 4)) / sum(total), 2) AS pct_esp_vert_2011
FROM cnt11
WHERE value > 0 -- discard no data, including postgis raster no data
GROUP BY "GeoUID"
)
SELECT "GeoUID"
,st_area(geometry) ct_area_m2
,coalesce(pct_esp_vert_2011, 0) pct_esp_vert_2011
,coalesce(pct_esp_vert_2015, 0) pct_esp_vert_2015
,coalesce(pct_esp_vert_2019, 0) pct_esp_vert_2019
FROM ct16
FULL JOIN canopee19 USING ("GeoUID")
FULL JOIN canopee15 USING ("GeoUID")
FULL JOIN canopee11 USING ("GeoUID");
Get it here
pampalon <- read.xlsx("data/Canada2016Pampalon/A-MSDIData_Can2016_eng/1. EquivalenceTableCanada2016_ENG.xlsx", sheet = 2) %>%
mutate(DA = as.character(DA)) %>%
select(DA, SCOREMAT, SCORESOC)
# 2016 DA boundaries for Montreal
DA16 <- get_census(dataset='CA16', regions=list(CMA='24462'), level='DA', geo_format = "sf") %>%
filter(Type == "DA") %>%
st_transform(st_crs(bike_lane))
## Reading geo data from local cache.
pampalon <- DA16 %>%
inner_join(pampalon, by = c("GeoUID" = "DA")) %>%
as.data.frame()
# Get Pampalon 2011
pampalon11 <- read.xlsx("data/Canada2011Pampalon/A-MSDIData_Can2011_eng/1. CorrespondenceTable_Can2011_eng.xlsx", sheet = 2) %>%
mutate(DA = as.character(DA)) %>%
select(DA, DAPOP2011, SCOREMAT, SCORESOC)
# Get LUT DA2011 <-> DA2016 from StatCan
lut_da <- read.csv("data/2016_92-156_DA_AD_csv/2016_92-156_DA_AD.csv", colClasses = "character") %>%
select(!c(DBUID2016.IDIDU2016, DA_rel_flag.AD_ind_rel)) %>%
unique()
# Link Pampalon 2011 to LUT and compute weighted mean of scores of Pampalon 2011
pampalon11.16 <- pampalon11 %>%
inner_join(lut_da, by = c("DA" = "DAUID2011.ADIDU2011")) %>%
group_by(DAUID2016.ADIDU2016) %>%
summarise(pop2011 = sum(DAPOP2011),
SCOREMAT = weighted.mean(SCOREMAT, DAPOP2011, na.rm = TRUE),
SCORESOC = weighted.mean(SCORESOC, DAPOP2011, na.rm = TRUE))
# Then link Pampalon 2011 to 2016
pampalon <- pampalon %>%
left_join(pampalon11.16, by = c("GeoUID" = "DAUID2016.ADIDU2016"), suffix = c(".16", ".11"))
# Aggregate at the CT level
pampalon_CT <- pampalon %>%
group_by(CT_UID) %>%
summarise(wSCOREMAT.2016 = weighted.mean(SCOREMAT.16, Population, na.rm = TRUE),
wSCORESOC.2016 = weighted.mean(SCORESOC.16, Population, na.rm = TRUE),
wSCOREMAT.2011 = weighted.mean(SCOREMAT.11, pop2011, na.rm = TRUE),
wSCORESOC.2011 = weighted.mean(SCORESOC.11, pop2011, na.rm = TRUE))
# Clean up
rm(lut_da, pampalon11.16, pampalon11)
# Display map
pampalon_CT_geom <- CT16 %>%
left_join(pampalon_CT, by = c("GeoUID" = "CT_UID")) %>%
filter(interact_aoi)
pampalon_data <- bi_class(pampalon_CT_geom, x = wSCOREMAT.2016, y = wSCORESOC.2016, style = "quantile", dim = 3)
## Warning in classInt::classIntervals(bins_x, n = dim, style = "quantile"): var
## has missing values, omitted in finding classes
## Warning in classInt::classIntervals(bins_y, n = dim, style = "quantile"): var
## has missing values, omitted in finding classes
map <- ggplot() +
geom_sf(data = pampalon_data, mapping = aes(fill = bi_class), color = "white", size = 0.1, show.legend = FALSE) +
bi_scale_fill(pal = "DkBlue", dim = 3) +
labs(title = "Pampalon: material and social deprivation index") +
theme(panel.background = element_rect(fill = "white"),
#axis.ticks = element_blank(),
#axis.text = element_blank(),
panel.grid = element_line(color = "darkgray", size = 0.2))
legend <- bi_legend(pal = "DkBlue",
dim = 3,
xlab = "Material ",
ylab = "Social ",
size = 8)
ggdraw() +
draw_plot(map, 0, 0, 1, 1) +
draw_plot(legend, 0.1, .7, 0.2, 0.2)
# Load gentrified CTs, 5 year span (from repo gentrification_metrics)
ding <- list()
ding[["2016"]] <- st_read("~/WORKSPACE/gentrification_metrics/R/data/gentrified_5years.gpkg", "gentrified_ding_16", quiet=TRUE) %>%
filter(cma_uid_16 == "24462") %>%
st_transform(st_crs(bike_lane))
ding[["2011"]] <- st_read("~/WORKSPACE/gentrification_metrics/R/data/gentrified_5years.gpkg", "gentrified_ding_11", quiet=TRUE) %>%
filter(cma_uid_11 == "24462") %>%
st_transform(st_crs(bike_lane))
ding[["2006"]] <- st_read("~/WORKSPACE/gentrification_metrics/R/data/gentrified_5years.gpkg", "gentrified_ding_06", quiet=TRUE) %>%
filter(cma_uid_06 == "24462") %>%
st_transform(st_crs(bike_lane))
ding_map <- ding[["2016"]] %>%
left_join(select(as.data.frame(CT16), GeoUID, interact_aoi), by = c("ct_uid_16" = "GeoUID")) %>%
filter(interact_aoi)
ggplot(data = ding_map) +
geom_sf(aes(fill = gentrified_2016_2011, colour=gentrifiable_2011)) +
scale_fill_manual(values = c("gray", "red", "darkgray"), name = "Gentrified in 2016") +
scale_colour_manual(values = c("darkgray", "darkred", "darkgray"), name = "Gentrifiable in 2011") +
labs(title = "Census tract gentrification status in 2016")
Outcome variables = Pampalon deprivation index or gentrification flag Independent variables = all bike lane and canopy variables
All variables + outcome linked at the CT level
.bike_lane_changes <- bike_lane_changes %>%
as.data.frame() %>%
select(GeoUID, ends_with("ct", ignore.case = FALSE), ends_with("b250", ignore.case = FALSE), ends_with("b500", ignore.case = FALSE), ends_with("b750", ignore.case = FALSE)) %>%
select(GeoUID, starts_with("Bike_lane")) # Drop individual category lane length
bei_df <- CT16 %>%
as.data.frame() %>%
transmute(CT_UID = GeoUID,
CD_UID = CD_UID,
CSD_UID = CSD_UID,
interact_aoi = interact_aoi,
Population = Population) %>%
left_join(pampalon_CT, by="CT_UID") %>%
left_join(.bike_lane_changes, by=c("CT_UID" = "GeoUID")) %>%
left_join(as.data.frame(esp_vert_ct), by=c("CT_UID" = "GeoUID")) %>%
left_join(as.data.frame(esp_vert_buf250), by=c("CT_UID" = "GeoUID"), suffix=c("ct", "b250")) %>%
left_join(as.data.frame(esp_vert_buf500), by=c("CT_UID" = "GeoUID")) %>%
left_join(as.data.frame(esp_vert_buf750), by=c("CT_UID" = "GeoUID"), suffix=c("b500", "b750")) %>%
left_join(select(as.data.frame(ding$`2016`), ct_uid_16, starts_with("gentrif")), by=c("CT_UID" = "ct_uid_16")) %>%
left_join(select(as.data.frame(ding$`2011`), ct_uid_11, starts_with("gentrif")), by=c("CT_UID" = "ct_uid_11")) %>%
left_join(select(as.data.frame(ding$`2006`), ct_uid_06, starts_with("gentrif")), by=c("CT_UID" = "ct_uid_06"))
head(bei_df)
write.csv(bei_df, "data/_results/bei_equity.csv", na="", row.names = FALSE)
Included variables:
CT_UID: 2016 Census Tract IDCD_UID: 2016 Census DivisionCSD_UID: 2016 Census Subdivisioninteract_aoi: Does CT belong to INTERACT study area?Population: 2016 Population within CTct_area_m2.{ct|b{250|500|750}}: Area of CT or buffer of 250, 500 or 750m radius around CT, in square metersgentrified_2016_2011: Is the CT gentrified in 2016?gentrifiable_2011: Is the CT candidate to gentrification in 2011?gentrified_2011_2006: Is the CT gentrified in 2011gentrifiable_2006: Is the CT candidate to gentrification in 2006gentrified_2006_2001: Is the CT gentrified in 2006gentrifiable_2001: Is the CT candidate to gentrification in 2001wSCOREMAT.2016: Social deprivation index in 2016 (population weighted)wSCORESOC.2016: Material deprivation index in 2016 (population weighted)wSCOREMAT.2011: Social deprivation index in 2011 (population weighted)wSCORESOC.2011: Material deprivation index in 2011 (population weighted)Bike_lane_total.{2016|2011}{ct|b{250|500|750}}: total length of bike lanes, in 2016 or 2011, within CT or buffer of 250, 500 or 750m radiusBike_lane_diff.2011.2016{ct|b{250|500|750}}: change in total length of bike lanes between 2011 and 2011, within CT or buffer of 250, 500 or 750m radiusBike_lane_diff.by.street.2011.2016{ct|b{250|500|750}}: change in total length of bike lanes between 2011 and 2011, normalized by street length, within CT or buffer of 250, 500 or 750m radiusBike_lane_diff.by.area.2011.2016{ct|b{250|500|750}}: change in total length of bike lanes between 2011 and 2011, normalized by area, within CT or buffer of 250, 500 or 750m radiuspct_esp_vert_{2011|2015|2019}.{ct|b{250|500|750}}: % of green space in 2011, 2015 or 2019 within CT or buffer of 250, 500 or 750m radiuspct_esp_vert_diff{2011|2015}.{2015|2019}.{ct|b{250|500|750}}: change in % of green space between 2011 and 2015, 2011 and 2019 as well as 2011 and 2019, within CT or buffer of 250, 500 or 750m radiusWhole area ~ Montréal CMA / CMM
.bei_df_long <- bei_df %>%
units::drop_units() %>%
select(CT_UID, CD_UID, starts_with("wSCORE")) %>%
pivot_longer(!c(CT_UID, CD_UID))
ggplot(.bei_df_long, aes(value)) +
geom_histogram() +
facet_wrap(~name, scales = "free")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 82 rows containing non-finite values (stat_bin).
.bei_df_long <- bei_df %>%
units::drop_units() %>%
select(CT_UID, CD_UID, starts_with("gentrif")) %>%
pivot_longer(!c(CT_UID, CD_UID))
ggplot(.bei_df_long, aes(value)) +
geom_bar() +
facet_wrap(~name, scales = "free", ncol = 3)
.bei_df_long <- bei_df %>%
units::drop_units() %>%
select(CT_UID, CD_UID, matches("^Bike_lane.*ct$"), matches("^pct_esp_vert_diff.*ct$")) %>%
pivot_longer(!c(CT_UID, CD_UID))
ggplot(.bei_df_long, aes(value)) +
geom_histogram() +
facet_wrap(~name, scales = "free")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 252 rows containing non-finite values (stat_bin).
.bei_df_long <- bei_df %>%
units::drop_units() %>%
select(CT_UID, CD_UID, matches("^Bike_lane.*b250$"), matches("^pct_esp_vert_diff.*b250$")) %>%
pivot_longer(!c(CT_UID, CD_UID))
ggplot(.bei_df_long, aes(value)) +
geom_histogram() +
facet_wrap(~name, scales = "free")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 233 rows containing non-finite values (stat_bin).
.bei_df_long <- bei_df %>%
units::drop_units() %>%
select(CT_UID, CD_UID, matches("^Bike_lane.*b500$"), matches("^pct_esp_vert_diff.*b500$")) %>%
pivot_longer(!c(CT_UID, CD_UID))
ggplot(.bei_df_long, aes(value)) +
geom_histogram() +
facet_wrap(~name, scales = "free")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 229 rows containing non-finite values (stat_bin).
.bei_df_long <- bei_df %>%
units::drop_units() %>%
select(CT_UID, CD_UID, matches("^Bike_lane.*b750$"), matches("^pct_esp_vert_diff.*b750$")) %>%
pivot_longer(!c(CT_UID, CD_UID))
ggplot(.bei_df_long, aes(value)) +
geom_histogram() +
facet_wrap(~name, scales = "free")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 222 rows containing non-finite values (stat_bin).
INTERACT study area ~ Montréal, Laval, Longueuil, Brossard, St-Lambert
.bei_df_long <- bei_df %>%
filter(interact_aoi) %>%
units::drop_units() %>%
select(CT_UID, CD_UID, starts_with("wSCORE")) %>%
pivot_longer(!c(CT_UID, CD_UID))
ggplot(.bei_df_long, aes(value)) +
geom_histogram() +
facet_wrap(~name, scales = "free")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 58 rows containing non-finite values (stat_bin).
.bei_df_long <- bei_df %>%
filter(interact_aoi) %>%
units::drop_units() %>%
select(CT_UID, CD_UID, starts_with("gentrif")) %>%
pivot_longer(!c(CT_UID, CD_UID))
ggplot(.bei_df_long, aes(value)) +
geom_bar() +
facet_wrap(~name, scales = "free", ncol = 3)
.bei_df_long <- bei_df %>%
filter(interact_aoi) %>%
units::drop_units() %>%
select(CT_UID, CD_UID, matches("^Bike_lane.*ct$"), matches("^pct_esp_vert_diff.*ct$")) %>%
pivot_longer(!c(CT_UID, CD_UID))
ggplot(.bei_df_long, aes(value)) +
geom_histogram() +
facet_wrap(~name, scales = "free")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
.bei_df_long <- bei_df %>%
filter(interact_aoi) %>%
units::drop_units() %>%
select(CT_UID, CD_UID, matches("^Bike_lane.*b250$"), matches("^pct_esp_vert_diff.*b250$")) %>%
pivot_longer(!c(CT_UID, CD_UID))
ggplot(.bei_df_long, aes(value)) +
geom_histogram() +
facet_wrap(~name, scales = "free")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
.bei_df_long <- bei_df %>%
filter(interact_aoi) %>%
units::drop_units() %>%
select(CT_UID, CD_UID, matches("^Bike_lane.*b500$"), matches("^pct_esp_vert_diff.*b500$")) %>%
pivot_longer(!c(CT_UID, CD_UID))
ggplot(.bei_df_long, aes(value)) +
geom_histogram() +
facet_wrap(~name, scales = "free")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
.bei_df_long <- bei_df %>%
filter(interact_aoi) %>%
units::drop_units() %>%
select(CT_UID, CD_UID, matches("^Bike_lane.*b750$"), matches("^pct_esp_vert_diff.*b750$")) %>%
pivot_longer(!c(CT_UID, CD_UID))
ggplot(.bei_df_long, aes(value)) +
geom_histogram() +
facet_wrap(~name, scales = "free")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
Questions @Yan:
Measuring bike lane length change within CT/buffers (in meters) between 2011 and 2016
ggplot(units::drop_units(bei_df), aes(x=Bike_lane_diff.2011.2016ct, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.2011.2016ct, data = units::drop_units(bei_df))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.2011.2016ct, data = units::drop_units(bei_df))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.14093 -0.02165 -0.00058 0.02353 0.13849
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.904e-04 1.219e-03 0.32 0.7488
## Bike_lane_diff.2011.2016ct -3.201e-06 1.301e-06 -2.46 0.0141 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03602 on 948 degrees of freedom
## (20 observations deleted due to missingness)
## Multiple R-squared: 0.006345, Adjusted R-squared: 0.005297
## F-statistic: 6.053 on 1 and 948 DF, p-value: 0.01406
ggplot(units::drop_units(bei_df), aes(x=Bike_lane_diff.2011.2016b250, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.2011.2016b250, data = units::drop_units(bei_df))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.2011.2016b250, data = units::drop_units(bei_df))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.141558 -0.021775 -0.000925 0.023297 0.137860
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.016e-03 1.277e-03 0.796 0.42622
## Bike_lane_diff.2011.2016b250 -2.258e-06 7.906e-07 -2.856 0.00438 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03598 on 948 degrees of freedom
## (20 observations deleted due to missingness)
## Multiple R-squared: 0.008533, Adjusted R-squared: 0.007487
## F-statistic: 8.159 on 1 and 948 DF, p-value: 0.004378
ggplot(units::drop_units(bei_df), aes(x=Bike_lane_diff.2011.2016b500, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.2011.2016b500, data = units::drop_units(bei_df))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.2011.2016b500, data = units::drop_units(bei_df))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.142173 -0.021775 -0.000562 0.023345 0.137246
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.630e-03 1.328e-03 1.228 0.21993
## Bike_lane_diff.2011.2016b500 -1.772e-06 5.396e-07 -3.284 0.00106 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03593 on 948 degrees of freedom
## (20 observations deleted due to missingness)
## Multiple R-squared: 0.01125, Adjusted R-squared: 0.01021
## F-statistic: 10.79 on 1 and 948 DF, p-value: 0.00106
ggplot(units::drop_units(bei_df), aes(x=Bike_lane_diff.2011.2016b750, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.2011.2016b750, data = units::drop_units(bei_df))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.2011.2016b750, data = units::drop_units(bei_df))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.142411 -0.022130 -0.000503 0.022855 0.137007
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.869e-03 1.372e-03 1.362 0.17341
## Bike_lane_diff.2011.2016b750 -1.258e-06 3.904e-07 -3.221 0.00132 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03594 on 948 degrees of freedom
## (20 observations deleted due to missingness)
## Multiple R-squared: 0.01083, Adjusted R-squared: 0.009782
## F-statistic: 10.38 on 1 and 948 DF, p-value: 0.001321
Measuring bike lane length change, normalized by length of streets within CT/buffers (in meters)
ggplot(units::drop_units(bei_df), aes(x=Bike_lane_diff.by.street.2011.2016ct, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.by.street.2011.2016ct, data = units::drop_units(bei_df))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.by.street.2011.2016ct,
## data = units::drop_units(bei_df))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.140946 -0.025988 0.001677 0.026813 0.138472
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.0004043 0.0016064 0.252 0.801
## Bike_lane_diff.by.street.2011.2016ct -0.0164586 0.0155086 -1.061 0.289
##
## Residual standard error: 0.03978 on 702 degrees of freedom
## (266 observations deleted due to missingness)
## Multiple R-squared: 0.001602, Adjusted R-squared: 0.0001796
## F-statistic: 1.126 on 1 and 702 DF, p-value: 0.2889
ggplot(units::drop_units(bei_df), aes(x=Bike_lane_diff.by.street.2011.2016b250, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.by.street.2011.2016b250, data = units::drop_units(bei_df))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.by.street.2011.2016b250,
## data = units::drop_units(bei_df))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.142037 -0.025277 0.001961 0.026047 0.137382
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.001495 0.001676 0.892 0.373
## Bike_lane_diff.by.street.2011.2016b250 -0.055109 0.024530 -2.247 0.025 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03926 on 721 degrees of freedom
## (247 observations deleted due to missingness)
## Multiple R-squared: 0.006952, Adjusted R-squared: 0.005574
## F-statistic: 5.047 on 1 and 721 DF, p-value: 0.02497
ggplot(units::drop_units(bei_df), aes(x=Bike_lane_diff.by.street.2011.2016b500, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.by.street.2011.2016b500, data = units::drop_units(bei_df))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.by.street.2011.2016b500,
## data = units::drop_units(bei_df))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.142775 -0.025498 0.001986 0.026003 0.136643
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.002233 0.001769 1.263 0.20711
## Bike_lane_diff.by.street.2011.2016b500 -0.080139 0.030254 -2.649 0.00825 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03916 on 724 degrees of freedom
## (244 observations deleted due to missingness)
## Multiple R-squared: 0.009598, Adjusted R-squared: 0.00823
## F-statistic: 7.016 on 1 and 724 DF, p-value: 0.008253
ggplot(units::drop_units(bei_df), aes(x=Bike_lane_diff.by.street.2011.2016b750, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.by.street.2011.2016b750, data = units::drop_units(bei_df))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.by.street.2011.2016b750,
## data = units::drop_units(bei_df))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.142956 -0.025333 0.002213 0.026062 0.136463
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.002414 0.001838 1.313 0.18946
## Bike_lane_diff.by.street.2011.2016b750 -0.090105 0.034322 -2.625 0.00884 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03906 on 731 degrees of freedom
## (237 observations deleted due to missingness)
## Multiple R-squared: 0.00934, Adjusted R-squared: 0.007985
## F-statistic: 6.892 on 1 and 731 DF, p-value: 0.008838
Measuring bike lane length change, normalized by area within CT/buffers (in meters)
ggplot(units::drop_units(bei_df), aes(x=Bike_lane_diff.by.area.2011.2016ct, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.by.area.2011.2016ct, data = units::drop_units(bei_df))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.by.area.2011.2016ct,
## data = units::drop_units(bei_df))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.140461 -0.022162 -0.000097 0.023480 0.138958
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -8.102e-05 1.265e-03 -0.064 0.949
## Bike_lane_diff.by.area.2011.2016ct -8.785e-04 1.104e-03 -0.796 0.426
##
## Residual standard error: 0.03612 on 948 degrees of freedom
## (20 observations deleted due to missingness)
## Multiple R-squared: 0.0006678, Adjusted R-squared: -0.0003864
## F-statistic: 0.6335 on 1 and 948 DF, p-value: 0.4263
ggplot(units::drop_units(bei_df), aes(x=Bike_lane_diff.by.area.2011.2016b250, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.by.area.2011.2016b250, data = units::drop_units(bei_df))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.by.area.2011.2016b250,
## data = units::drop_units(bei_df))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.141396 -0.022428 -0.000406 0.023373 0.138023
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.0008536 0.0013002 0.657 0.5117
## Bike_lane_diff.by.area.2011.2016b250 -0.0032359 0.0014014 -2.309 0.0212 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03603 on 948 degrees of freedom
## (20 observations deleted due to missingness)
## Multiple R-squared: 0.005593, Adjusted R-squared: 0.004544
## F-statistic: 5.332 on 1 and 948 DF, p-value: 0.02115
ggplot(units::drop_units(bei_df), aes(x=Bike_lane_diff.by.area.2011.2016b500, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.by.area.2011.2016b500, data = units::drop_units(bei_df))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.by.area.2011.2016b500,
## data = units::drop_units(bei_df))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.141827 -0.021977 -0.000228 0.023279 0.137592
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.001285 0.001332 0.965 0.33497
## Bike_lane_diff.by.area.2011.2016b500 -0.004451 0.001634 -2.724 0.00657 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03599 on 948 degrees of freedom
## (20 observations deleted due to missingness)
## Multiple R-squared: 0.007765, Adjusted R-squared: 0.006718
## F-statistic: 7.419 on 1 and 948 DF, p-value: 0.006573
ggplot(units::drop_units(bei_df), aes(x=Bike_lane_diff.by.area.2011.2016b750, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.by.area.2011.2016b750, data = units::drop_units(bei_df))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.by.area.2011.2016b750,
## data = units::drop_units(bei_df))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.141943 -0.022225 -0.000778 0.023093 0.137475
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.001401 0.001357 1.033 0.30193
## Bike_lane_diff.by.area.2011.2016b750 -0.004838 0.001794 -2.697 0.00713 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03599 on 948 degrees of freedom
## (20 observations deleted due to missingness)
## Multiple R-squared: 0.007613, Adjusted R-squared: 0.006566
## F-statistic: 7.272 on 1 and 948 DF, p-value: 0.007126
Measuring canopy (i.e. greenness) ratio change within CT/buffer between 2011 and 2019 (in %)
ggplot(units::drop_units(bei_df), aes(x=pct_esp_vert_diff_2011.2019ct, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ pct_esp_vert_diff_2011.2019ct, data = units::drop_units(bei_df))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ pct_esp_vert_diff_2011.2019ct,
## data = units::drop_units(bei_df))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.140498 -0.022107 0.000299 0.023728 0.142023
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.0004029 0.0014079 0.286 0.775
## pct_esp_vert_diff_2011.2019ct -0.0002172 0.0001964 -1.106 0.269
##
## Residual standard error: 0.03611 on 948 degrees of freedom
## (20 observations deleted due to missingness)
## Multiple R-squared: 0.001289, Adjusted R-squared: 0.0002352
## F-statistic: 1.223 on 1 and 948 DF, p-value: 0.269
ggplot(units::drop_units(bei_df), aes(x=pct_esp_vert_diff_2011.2019b250, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ pct_esp_vert_diff_2011.2019b250, data = units::drop_units(bei_df))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ pct_esp_vert_diff_2011.2019b250,
## data = units::drop_units(bei_df))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.14025 -0.02209 0.00034 0.02352 0.14000
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.0009586 0.0014049 0.682 0.4952
## pct_esp_vert_diff_2011.2019b250 -0.0003734 0.0002045 -1.826 0.0682 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03607 on 948 degrees of freedom
## (20 observations deleted due to missingness)
## Multiple R-squared: 0.003504, Adjusted R-squared: 0.002453
## F-statistic: 3.333 on 1 and 948 DF, p-value: 0.0682
ggplot(units::drop_units(bei_df), aes(x=pct_esp_vert_diff_2011.2019b500, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ pct_esp_vert_diff_2011.2019b500, data = units::drop_units(bei_df))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ pct_esp_vert_diff_2011.2019b500,
## data = units::drop_units(bei_df))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.139854 -0.022182 0.000328 0.023299 0.140003
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.0009664 0.0014117 0.685 0.494
## pct_esp_vert_diff_2011.2019b500 -0.0003804 0.0002105 -1.807 0.071 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03607 on 948 degrees of freedom
## (20 observations deleted due to missingness)
## Multiple R-squared: 0.003434, Adjusted R-squared: 0.002383
## F-statistic: 3.267 on 1 and 948 DF, p-value: 0.07101
ggplot(units::drop_units(bei_df), aes(x=pct_esp_vert_diff_2011.2019b750, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ pct_esp_vert_diff_2011.2019b750, data = units::drop_units(bei_df))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ pct_esp_vert_diff_2011.2019b750,
## data = units::drop_units(bei_df))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.13978 -0.02219 0.00027 0.02354 0.13981
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.0011957 0.0014218 0.841 0.4006
## pct_esp_vert_diff_2011.2019b750 -0.0004450 0.0002172 -2.049 0.0407 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03605 on 948 degrees of freedom
## (20 observations deleted due to missingness)
## Multiple R-squared: 0.004409, Adjusted R-squared: 0.003359
## F-statistic: 4.198 on 1 and 948 DF, p-value: 0.04074
Measuring bike lane length change within CT/buffers (in meters) between 2011 and 2016
ggplot(drop_na(units::drop_units(bei_df), gentrified_2016_2011), aes(x=Bike_lane_diff.2011.2016ct, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016ct, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016ct, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016ct ~ gentrified_2016_2011, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 205247 205247 0.253 0.615
## Residuals 945 765953237 810533
## 23 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2016_2011), aes(x=Bike_lane_diff.2011.2016b250, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016b250, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016b250, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016b250 ~ gentrified_2016_2011, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 2.977e+07 29772990 13.79 0.000216 ***
## Residuals 945 2.040e+09 2159034
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 23 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2016_2011), aes(x=Bike_lane_diff.2011.2016b500, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016b500, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016b500, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016b500 ~ gentrified_2016_2011, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 1.594e+08 159408890 35.28 4.01e-09 ***
## Residuals 945 4.270e+09 4518550
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 23 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2016_2011), aes(x=Bike_lane_diff.2011.2016b750, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016b750, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016b750, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016b750 ~ gentrified_2016_2011, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 4.517e+08 451658967 53.32 6.02e-13 ***
## Residuals 945 8.005e+09 8471075
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 23 observations deleted due to missingness
Measuring bike lane length change, normalized by length of streets within CT/buffers (in meters)
ggplot(drop_na(units::drop_units(bei_df), gentrified_2016_2011), aes(x=Bike_lane_diff.by.street.2011.2016ct, y=gentrified_2016_2011)) +
geom_boxplot()
## Warning: Removed 244 rows containing non-finite values (stat_boxplot).
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.by.street.2011.2016ct, na.rm = TRUE),
sd = sd(Bike_lane_diff.by.street.2011.2016ct, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.by.street.2011.2016ct ~ gentrified_2016_2011, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 0.078 0.07844 8.461 0.00374 **
## Residuals 701 6.499 0.00927
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 267 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2016_2011), aes(x=Bike_lane_diff.by.street.2011.2016b250, y=gentrified_2016_2011)) +
geom_boxplot()
## Warning: Removed 225 rows containing non-finite values (stat_boxplot).
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.by.street.2011.2016b250, na.rm = TRUE),
sd = sd(Bike_lane_diff.by.street.2011.2016b250, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.by.street.2011.2016b250 ~ gentrified_2016_2011, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 0.1172 0.1172 34.53 6.43e-09 ***
## Residuals 720 2.4449 0.0034
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 248 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2016_2011), aes(x=Bike_lane_diff.by.street.2011.2016b500, y=gentrified_2016_2011)) +
geom_boxplot()
## Warning: Removed 222 rows containing non-finite values (stat_boxplot).
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.by.street.2011.2016b500, na.rm = TRUE),
sd = sd(Bike_lane_diff.by.street.2011.2016b500, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.by.street.2011.2016b500 ~ gentrified_2016_2011, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 0.1045 0.10452 48.14 8.83e-12 ***
## Residuals 723 1.5697 0.00217
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 245 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2016_2011), aes(x=Bike_lane_diff.by.street.2011.2016b750, y=gentrified_2016_2011)) +
geom_boxplot()
## Warning: Removed 215 rows containing non-finite values (stat_boxplot).
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.by.street.2011.2016b750, na.rm = TRUE),
sd = sd(Bike_lane_diff.by.street.2011.2016b750, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.by.street.2011.2016b750 ~ gentrified_2016_2011, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 0.0844 0.08440 50.98 2.26e-12 ***
## Residuals 730 1.2086 0.00166
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 238 observations deleted due to missingness
Measuring bike lane length change, normalized by area within CT/buffers (in meters)
ggplot(drop_na(units::drop_units(bei_df), gentrified_2016_2011), aes(x=Bike_lane_diff.by.area.2011.2016ct, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.by.area.2011.2016ct, na.rm = TRUE),
sd = sd(Bike_lane_diff.by.area.2011.2016ct, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.by.area.2011.2016ct ~ gentrified_2016_2011, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 61.1 61.09 57.2 9.34e-14 ***
## Residuals 945 1009.3 1.07
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 23 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2016_2011), aes(x=Bike_lane_diff.by.area.2011.2016b250, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.by.area.2011.2016b250, na.rm = TRUE),
sd = sd(Bike_lane_diff.by.area.2011.2016b250, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.by.area.2011.2016b250 ~ gentrified_2016_2011, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 66.9 66.86 106.4 <2e-16 ***
## Residuals 945 593.7 0.63
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 23 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2016_2011), aes(x=Bike_lane_diff.by.area.2011.2016b500, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.by.area.2011.2016b500, na.rm = TRUE),
sd = sd(Bike_lane_diff.by.area.2011.2016b500, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.by.area.2011.2016b500 ~ gentrified_2016_2011, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 58.6 58.57 130.1 <2e-16 ***
## Residuals 945 425.3 0.45
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 23 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2016_2011), aes(x=Bike_lane_diff.by.area.2011.2016b750, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.by.area.2011.2016b750, na.rm = TRUE),
sd = sd(Bike_lane_diff.by.area.2011.2016b750, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.by.area.2011.2016b750 ~ gentrified_2016_2011, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 49.0 49.05 131.7 <2e-16 ***
## Residuals 945 351.9 0.37
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 23 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2016_2011), aes(x=pct_esp_vert_diff_2011.2019ct, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019ct, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019ct, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019ct ~ gentrified_2016_2011, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 42 42.47 1.218 0.27
## Residuals 945 32955 34.87
## 23 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2016_2011), aes(x=pct_esp_vert_diff_2011.2019b250, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019b250, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019b250, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019b250 ~ gentrified_2016_2011, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 17 17.34 0.54 0.463
## Residuals 945 30337 32.10
## 23 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2016_2011), aes(x=pct_esp_vert_diff_2011.2019b500, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019b500, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019b500, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019b500 ~ gentrified_2016_2011, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 9 8.524 0.282 0.596
## Residuals 945 28608 30.273
## 23 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2016_2011), aes(x=pct_esp_vert_diff_2011.2019b750, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019b750, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019b750, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019b750 ~ gentrified_2016_2011, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 1 1.054 0.037 0.847
## Residuals 945 26789 28.349
## 23 observations deleted due to missingness
Measuring bike lane length change within CT/buffers (in meters) between 2011 and 2016 (and not between 2006 and 2011)
ggplot(drop_na(units::drop_units(bei_df), gentrified_2011_2006), aes(x=Bike_lane_diff.2011.2016ct, y=gentrified_2011_2006)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2011_2006) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016ct, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016ct, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016ct ~ gentrified_2011_2006, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2011_2006 1 691401 691401 0.805 0.37
## Residuals 886 760756987 858642
## 82 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2011_2006), aes(x=Bike_lane_diff.2011.2016b250, y=gentrified_2011_2006)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2011_2006) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016b250, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016b250, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016b250 ~ gentrified_2011_2006, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2011_2006 1 3.867e+07 38666795 17.08 3.92e-05 ***
## Residuals 886 2.005e+09 2263514
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 82 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2011_2006), aes(x=Bike_lane_diff.2011.2016b500, y=gentrified_2011_2006)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2011_2006) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016b500, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016b500, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016b500 ~ gentrified_2011_2006, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2011_2006 1 1.625e+08 162483870 34.41 6.3e-09 ***
## Residuals 886 4.184e+09 4722050
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 82 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2011_2006), aes(x=Bike_lane_diff.2011.2016b750, y=gentrified_2011_2006)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2011_2006) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016b750, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016b750, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016b750 ~ gentrified_2011_2006, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2011_2006 1 5.376e+08 537556297 61.72 1.14e-14 ***
## Residuals 886 7.717e+09 8709779
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 82 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2011_2006), aes(x=pct_esp_vert_diff_2011.2019ct, y=gentrified_2011_2006)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2011_2006) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019ct, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019ct, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019ct ~ gentrified_2011_2006, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2011_2006 1 165 164.99 4.791 0.0289 *
## Residuals 886 30509 34.43
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 82 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2011_2006), aes(x=pct_esp_vert_diff_2011.2019b250, y=gentrified_2011_2006)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2011_2006) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019b250, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019b250, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019b250 ~ gentrified_2011_2006, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2011_2006 1 147 147.0 5.367 0.0208 *
## Residuals 886 24275 27.4
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 82 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2011_2006), aes(x=pct_esp_vert_diff_2011.2019b500, y=gentrified_2011_2006)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2011_2006) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019b500, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019b500, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019b500 ~ gentrified_2011_2006, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2011_2006 1 96 95.68 3.71 0.0544 .
## Residuals 886 22853 25.79
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 82 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2011_2006), aes(x=pct_esp_vert_diff_2011.2019b750, y=gentrified_2011_2006)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2011_2006) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019b750, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019b750, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019b750 ~ gentrified_2011_2006, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2011_2006 1 58 58.42 2.378 0.123
## Residuals 886 21768 24.57
## 82 observations deleted due to missingness
Measuring bike lane length change within CT/buffers (in meters) between 2011 and 2016 (and not between 2001 and 2006)
ggplot(drop_na(units::drop_units(bei_df), gentrified_2006_2001), aes(x=Bike_lane_diff.2011.2016ct, y=gentrified_2006_2001)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2006_2001) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016ct, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016ct, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016ct ~ gentrified_2006_2001, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2006_2001 1 1629828 1629828 3.598 0.0582 .
## Residuals 802 363318022 453015
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 166 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2006_2001), aes(x=Bike_lane_diff.2011.2016b250, y=gentrified_2006_2001)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2006_2001) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016b250, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016b250, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016b250 ~ gentrified_2006_2001, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2006_2001 1 5.52e+07 55201554 40.24 3.74e-10 ***
## Residuals 802 1.10e+09 1371697
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 166 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2006_2001), aes(x=Bike_lane_diff.2011.2016b500, y=gentrified_2006_2001)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2006_2001) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016b500, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016b500, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016b500 ~ gentrified_2006_2001, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2006_2001 1 2.423e+08 242253012 71.08 <2e-16 ***
## Residuals 802 2.733e+09 3408209
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 166 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2006_2001), aes(x=Bike_lane_diff.2011.2016b750, y=gentrified_2006_2001)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2006_2001) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016b750, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016b750, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016b750 ~ gentrified_2006_2001, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2006_2001 1 7.300e+08 729955328 105.4 <2e-16 ***
## Residuals 802 5.555e+09 6926433
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 166 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2006_2001), aes(x=pct_esp_vert_diff_2011.2019ct, y=gentrified_2006_2001)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2006_2001) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019ct, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019ct, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019ct ~ gentrified_2006_2001, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2006_2001 1 81 81.36 2.674 0.102
## Residuals 802 24399 30.42
## 166 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2006_2001), aes(x=pct_esp_vert_diff_2011.2019b250, y=gentrified_2006_2001)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2006_2001) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019b250, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019b250, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019b250 ~ gentrified_2006_2001, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2006_2001 1 87 86.81 3.495 0.0619 .
## Residuals 802 19923 24.84
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 166 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2006_2001), aes(x=pct_esp_vert_diff_2011.2019b500, y=gentrified_2006_2001)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2006_2001) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019b500, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019b500, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019b500 ~ gentrified_2006_2001, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2006_2001 1 60 59.77 2.554 0.11
## Residuals 802 18768 23.40
## 166 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df), gentrified_2006_2001), aes(x=pct_esp_vert_diff_2011.2019b750, y=gentrified_2006_2001)) +
geom_boxplot()
bei_df %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2006_2001) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019b750, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019b750, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019b750 ~ gentrified_2006_2001, data = units::drop_units(bei_df))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2006_2001 1 28 28.27 1.254 0.263
## Residuals 802 18076 22.54
## 166 observations deleted due to missingness
# keep only interact CT
bei_df_aoi <- filter(bei_df, interact_aoi)
Measuring bike lane length change within CT/buffers (in meters) between 2011 and 2016
ggplot(units::drop_units(bei_df_aoi), aes(x=Bike_lane_diff.2011.2016ct, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.2011.2016ct, data = units::drop_units(bei_df_aoi))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.2011.2016ct, data = units::drop_units(bei_df_aoi))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.142085 -0.024870 0.001266 0.026881 0.137334
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.543e-03 1.605e-03 0.961 0.3368
## Bike_lane_diff.2011.2016ct -3.559e-06 1.462e-06 -2.434 0.0152 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03979 on 689 degrees of freedom
## (14 observations deleted due to missingness)
## Multiple R-squared: 0.008529, Adjusted R-squared: 0.00709
## F-statistic: 5.927 on 1 and 689 DF, p-value: 0.01517
ggplot(units::drop_units(bei_df_aoi), aes(x=Bike_lane_diff.2011.2016b250, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.2011.2016b250, data = units::drop_units(bei_df_aoi))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.2011.2016b250, data = units::drop_units(bei_df_aoi))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.143165 -0.025609 0.002509 0.026293 0.136254
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.623e-03 1.716e-03 1.528 0.12694
## Bike_lane_diff.2011.2016b250 -2.651e-06 9.069e-07 -2.924 0.00357 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03972 on 689 degrees of freedom
## (14 observations deleted due to missingness)
## Multiple R-squared: 0.01225, Adjusted R-squared: 0.01082
## F-statistic: 8.547 on 1 and 689 DF, p-value: 0.003574
ggplot(units::drop_units(bei_df_aoi), aes(x=Bike_lane_diff.2011.2016b500, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.2011.2016b500, data = units::drop_units(bei_df_aoi))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.2011.2016b500, data = units::drop_units(bei_df_aoi))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.144252 -0.025817 0.001971 0.026545 0.135167
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.710e-03 1.819e-03 2.039 0.041793 *
## Bike_lane_diff.2011.2016b500 -2.151e-06 6.312e-07 -3.407 0.000694 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03963 on 689 degrees of freedom
## (14 observations deleted due to missingness)
## Multiple R-squared: 0.01657, Adjusted R-squared: 0.01515
## F-statistic: 11.61 on 1 and 689 DF, p-value: 0.0006938
ggplot(units::drop_units(bei_df_aoi), aes(x=Bike_lane_diff.2011.2016b750, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.2011.2016b750, data = units::drop_units(bei_df_aoi))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.2011.2016b750, data = units::drop_units(bei_df_aoi))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.14482 -0.02576 0.00209 0.02703 0.13460
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.274e-03 1.911e-03 2.236 0.025643 *
## Bike_lane_diff.2011.2016b750 -1.594e-06 4.645e-07 -3.432 0.000634 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03962 on 689 degrees of freedom
## (14 observations deleted due to missingness)
## Multiple R-squared: 0.01681, Adjusted R-squared: 0.01538
## F-statistic: 11.78 on 1 and 689 DF, p-value: 0.0006341
Measuring bike lane length change, normalized by length of streets within CT/buffers (in meters)
ggplot(units::drop_units(bei_df_aoi), aes(x=Bike_lane_diff.by.street.2011.2016ct, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.by.street.2011.2016ct, data = units::drop_units(bei_df_aoi))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.by.street.2011.2016ct,
## data = units::drop_units(bei_df_aoi))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.141912 -0.025419 0.001723 0.026550 0.137507
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.001370 0.001704 0.804 0.422
## Bike_lane_diff.by.street.2011.2016ct -0.030762 0.021140 -1.455 0.146
##
## Residual standard error: 0.0399 on 689 degrees of freedom
## (14 observations deleted due to missingness)
## Multiple R-squared: 0.003064, Adjusted R-squared: 0.001617
## F-statistic: 2.118 on 1 and 689 DF, p-value: 0.1461
ggplot(units::drop_units(bei_df_aoi), aes(x=Bike_lane_diff.by.street.2011.2016b250, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.by.street.2011.2016b250, data = units::drop_units(bei_df_aoi))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.by.street.2011.2016b250,
## data = units::drop_units(bei_df_aoi))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.143191 -0.025638 0.002861 0.026222 0.136228
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.002649 0.001791 1.479 0.1396
## Bike_lane_diff.by.street.2011.2016b250 -0.069736 0.027749 -2.513 0.0122 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03978 on 689 degrees of freedom
## (14 observations deleted due to missingness)
## Multiple R-squared: 0.009083, Adjusted R-squared: 0.007645
## F-statistic: 6.316 on 1 and 689 DF, p-value: 0.01219
ggplot(units::drop_units(bei_df_aoi), aes(x=Bike_lane_diff.by.street.2011.2016b500, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.by.street.2011.2016b500, data = units::drop_units(bei_df_aoi))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.by.street.2011.2016b500,
## data = units::drop_units(bei_df_aoi))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.143997 -0.026054 0.002716 0.026615 0.135422
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.003455 0.001873 1.845 0.06547 .
## Bike_lane_diff.by.street.2011.2016b500 -0.093435 0.032161 -2.905 0.00379 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03972 on 689 degrees of freedom
## (14 observations deleted due to missingness)
## Multiple R-squared: 0.0121, Adjusted R-squared: 0.01067
## F-statistic: 8.44 on 1 and 689 DF, p-value: 0.003787
ggplot(units::drop_units(bei_df_aoi), aes(x=Bike_lane_diff.by.street.2011.2016b750, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.by.street.2011.2016b750, data = units::drop_units(bei_df_aoi))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.by.street.2011.2016b750,
## data = units::drop_units(bei_df_aoi))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.144234 -0.025710 0.003126 0.027081 0.135185
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.003691 0.001948 1.895 0.05855 .
## Bike_lane_diff.by.street.2011.2016b750 -0.100406 0.035771 -2.807 0.00514 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03973 on 689 degrees of freedom
## (14 observations deleted due to missingness)
## Multiple R-squared: 0.01131, Adjusted R-squared: 0.009871
## F-statistic: 7.879 on 1 and 689 DF, p-value: 0.005143
Measuring bike lane length change, normalized by area within CT/buffers (in meters)
ggplot(units::drop_units(bei_df_aoi), aes(x=Bike_lane_diff.by.area.2011.2016ct, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.by.area.2011.2016ct, data = units::drop_units(bei_df_aoi))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.by.area.2011.2016ct,
## data = units::drop_units(bei_df_aoi))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.141512 -0.025490 0.001817 0.026904 0.137906
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.0009702 0.0016937 0.573 0.567
## Bike_lane_diff.by.area.2011.2016ct -0.0012264 0.0012601 -0.973 0.331
##
## Residual standard error: 0.03993 on 689 degrees of freedom
## (14 observations deleted due to missingness)
## Multiple R-squared: 0.001373, Adjusted R-squared: -7.641e-05
## F-statistic: 0.9473 on 1 and 689 DF, p-value: 0.3308
ggplot(units::drop_units(bei_df_aoi), aes(x=Bike_lane_diff.by.area.2011.2016b250, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.by.area.2011.2016b250, data = units::drop_units(bei_df_aoi))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.by.area.2011.2016b250,
## data = units::drop_units(bei_df_aoi))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.143015 -0.025663 0.002708 0.026574 0.136404
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.002473 0.001764 1.402 0.1613
## Bike_lane_diff.by.area.2011.2016b250 -0.003997 0.001621 -2.466 0.0139 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03979 on 689 degrees of freedom
## (14 observations deleted due to missingness)
## Multiple R-squared: 0.008746, Adjusted R-squared: 0.007308
## F-statistic: 6.079 on 1 and 689 DF, p-value: 0.01392
ggplot(units::drop_units(bei_df_aoi), aes(x=Bike_lane_diff.by.area.2011.2016b500, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.by.area.2011.2016b500, data = units::drop_units(bei_df_aoi))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.by.area.2011.2016b500,
## data = units::drop_units(bei_df_aoi))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.14380 -0.02586 0.00240 0.02701 0.13561
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.003263 0.001829 1.784 0.0749 .
## Bike_lane_diff.by.area.2011.2016b500 -0.005608 0.001914 -2.931 0.0035 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03971 on 689 degrees of freedom
## (14 observations deleted due to missingness)
## Multiple R-squared: 0.01231, Adjusted R-squared: 0.01088
## F-statistic: 8.588 on 1 and 689 DF, p-value: 0.003496
ggplot(units::drop_units(bei_df_aoi), aes(x=Bike_lane_diff.by.area.2011.2016b750, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ Bike_lane_diff.by.area.2011.2016b750, data = units::drop_units(bei_df_aoi))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ Bike_lane_diff.by.area.2011.2016b750,
## data = units::drop_units(bei_df_aoi))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.14410 -0.02554 0.00260 0.02712 0.13532
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.003555 0.001881 1.890 0.05924 .
## Bike_lane_diff.by.area.2011.2016b750 -0.006271 0.002122 -2.955 0.00323 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.03971 on 689 degrees of freedom
## (14 observations deleted due to missingness)
## Multiple R-squared: 0.01252, Adjusted R-squared: 0.01108
## F-statistic: 8.734 on 1 and 689 DF, p-value: 0.00323
Measuring canopy (i.e. greenness) ratio change within CT/buffer between 2011 and 2019 (in %)
ggplot(units::drop_units(bei_df_aoi), aes(x=pct_esp_vert_diff_2011.2019ct, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ pct_esp_vert_diff_2011.2019ct, data = units::drop_units(bei_df_aoi))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ pct_esp_vert_diff_2011.2019ct,
## data = units::drop_units(bei_df_aoi))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.140225 -0.025875 0.001734 0.027493 0.133529
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.0011341 0.0019505 -0.581 0.561
## pct_esp_vert_diff_2011.2019ct 0.0003967 0.0003530 1.124 0.261
##
## Residual standard error: 0.03992 on 689 degrees of freedom
## (14 observations deleted due to missingness)
## Multiple R-squared: 0.00183, Adjusted R-squared: 0.0003809
## F-statistic: 1.263 on 1 and 689 DF, p-value: 0.2615
ggplot(units::drop_units(bei_df_aoi), aes(x=pct_esp_vert_diff_2011.2019b250, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ pct_esp_vert_diff_2011.2019b250, data = units::drop_units(bei_df_aoi))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ pct_esp_vert_diff_2011.2019b250,
## data = units::drop_units(bei_df_aoi))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.140800 -0.026341 0.001769 0.027364 0.138323
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.0001825 0.0019837 -0.092 0.927
## pct_esp_vert_diff_2011.2019b250 0.0001318 0.0003963 0.333 0.740
##
## Residual standard error: 0.03996 on 689 degrees of freedom
## (14 observations deleted due to missingness)
## Multiple R-squared: 0.0001604, Adjusted R-squared: -0.001291
## F-statistic: 0.1106 on 1 and 689 DF, p-value: 0.7396
ggplot(units::drop_units(bei_df_aoi), aes(x=pct_esp_vert_diff_2011.2019b500, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ pct_esp_vert_diff_2011.2019b500, data = units::drop_units(bei_df_aoi))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ pct_esp_vert_diff_2011.2019b500,
## data = units::drop_units(bei_df_aoi))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.141012 -0.026324 0.001867 0.027400 0.138192
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.0003420 0.0020046 -0.171 0.865
## pct_esp_vert_diff_2011.2019b500 0.0001867 0.0004184 0.446 0.656
##
## Residual standard error: 0.03995 on 689 degrees of freedom
## (14 observations deleted due to missingness)
## Multiple R-squared: 0.0002889, Adjusted R-squared: -0.001162
## F-statistic: 0.1991 on 1 and 689 DF, p-value: 0.6556
ggplot(units::drop_units(bei_df_aoi), aes(x=pct_esp_vert_diff_2011.2019b750, y=wSCOREMAT.2016)) +
geom_point() +
geom_smooth(method=lm)
res.lm <- lm(wSCOREMAT.2016 ~ pct_esp_vert_diff_2011.2019b750, data = units::drop_units(bei_df_aoi))
summary(res.lm)
##
## Call:
## lm(formula = wSCOREMAT.2016 ~ pct_esp_vert_diff_2011.2019b750,
## data = units::drop_units(bei_df_aoi))
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.140898 -0.026431 0.001807 0.027269 0.138488
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.795e-05 2.012e-03 -0.009 0.993
## pct_esp_vert_diff_2011.2019b750 8.494e-05 4.317e-04 0.197 0.844
##
## Residual standard error: 0.03996 on 689 degrees of freedom
## (14 observations deleted due to missingness)
## Multiple R-squared: 5.618e-05, Adjusted R-squared: -0.001395
## F-statistic: 0.03871 on 1 and 689 DF, p-value: 0.8441
Measuring bike lane length change within CT/buffers (in meters) between 2011 and 2016
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2016_2011), aes(x=Bike_lane_diff.2011.2016ct, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016ct, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016ct, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016ct ~ gentrified_2016_2011, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 1115825 1115825 1.038 0.309
## Residuals 688 739651503 1075075
## 15 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2016_2011), aes(x=Bike_lane_diff.2011.2016b250, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016b250, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016b250, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016b250 ~ gentrified_2016_2011, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 4.340e+06 4340160 1.56 0.212
## Residuals 688 1.914e+09 2781403
## 15 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2016_2011), aes(x=Bike_lane_diff.2011.2016b500, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016b500, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016b500, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016b500 ~ gentrified_2016_2011, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 4.732e+07 47317317 8.356 0.00396 **
## Residuals 688 3.896e+09 5662417
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 15 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2016_2011), aes(x=Bike_lane_diff.2011.2016b750, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016b750, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016b750, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016b750 ~ gentrified_2016_2011, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 1.527e+08 152740935 14.75 0.000134 ***
## Residuals 688 7.125e+09 10356102
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 15 observations deleted due to missingness
Measuring bike lane length change, normalized by length of streets within CT/buffers (in meters)
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2016_2011), aes(x=Bike_lane_diff.by.street.2011.2016ct, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.by.street.2011.2016ct, na.rm = TRUE),
sd = sd(Bike_lane_diff.by.street.2011.2016ct, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.by.street.2011.2016ct ~ gentrified_2016_2011, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 0.084 0.08434 16.69 4.92e-05 ***
## Residuals 688 3.477 0.00505
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 15 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2016_2011), aes(x=Bike_lane_diff.by.street.2011.2016b250, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.by.street.2011.2016b250, na.rm = TRUE),
sd = sd(Bike_lane_diff.by.street.2011.2016b250, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.by.street.2011.2016b250 ~ gentrified_2016_2011, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 0.1124 0.11239 39.8 5.03e-10 ***
## Residuals 688 1.9426 0.00282
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 15 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2016_2011), aes(x=Bike_lane_diff.by.street.2011.2016b500, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.by.street.2011.2016b500, na.rm = TRUE),
sd = sd(Bike_lane_diff.by.street.2011.2016b500, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.by.street.2011.2016b500 ~ gentrified_2016_2011, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 0.0965 0.09651 46.5 2.01e-11 ***
## Residuals 688 1.4280 0.00208
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 15 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2016_2011), aes(x=Bike_lane_diff.by.street.2011.2016b750, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.by.street.2011.2016b750, na.rm = TRUE),
sd = sd(Bike_lane_diff.by.street.2011.2016b750, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.by.street.2011.2016b750 ~ gentrified_2016_2011, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 0.0759 0.07586 45.14 3.85e-11 ***
## Residuals 688 1.1563 0.00168
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 15 observations deleted due to missingness
Measuring bike lane length change, normalized by area within CT/buffers (in meters)
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2016_2011), aes(x=Bike_lane_diff.by.area.2011.2016ct, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.by.area.2011.2016ct, na.rm = TRUE),
sd = sd(Bike_lane_diff.by.area.2011.2016ct, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.by.area.2011.2016ct ~ gentrified_2016_2011, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 34.5 34.48 24.46 9.52e-07 ***
## Residuals 688 969.5 1.41
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 15 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2016_2011), aes(x=Bike_lane_diff.by.area.2011.2016b250, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.by.area.2011.2016b250, na.rm = TRUE),
sd = sd(Bike_lane_diff.by.area.2011.2016b250, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.by.area.2011.2016b250 ~ gentrified_2016_2011, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 41.2 41.17 50.48 3.01e-12 ***
## Residuals 688 561.1 0.82
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 15 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2016_2011), aes(x=Bike_lane_diff.by.area.2011.2016b500, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.by.area.2011.2016b500, na.rm = TRUE),
sd = sd(Bike_lane_diff.by.area.2011.2016b500, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.by.area.2011.2016b500 ~ gentrified_2016_2011, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 35.4 35.39 61.66 1.57e-14 ***
## Residuals 688 394.9 0.57
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 15 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2016_2011), aes(x=Bike_lane_diff.by.area.2011.2016b750, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.by.area.2011.2016b750, na.rm = TRUE),
sd = sd(Bike_lane_diff.by.area.2011.2016b750, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.by.area.2011.2016b750 ~ gentrified_2016_2011, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 28.1 28.072 60.08 3.28e-14 ***
## Residuals 688 321.5 0.467
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 15 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2016_2011), aes(x=pct_esp_vert_diff_2011.2019ct, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019ct, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019ct, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019ct ~ gentrified_2016_2011, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 285 284.57 15.67 8.32e-05 ***
## Residuals 688 12494 18.16
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 15 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2016_2011), aes(x=pct_esp_vert_diff_2011.2019b250, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019b250, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019b250, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019b250 ~ gentrified_2016_2011, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 193 192.85 13.32 0.000283 ***
## Residuals 688 9963 14.48
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 15 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2016_2011), aes(x=pct_esp_vert_diff_2011.2019b500, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019b500, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019b500, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019b500 ~ gentrified_2016_2011, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 162 161.57 12.41 0.000454 ***
## Residuals 688 8955 13.02
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 15 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2016_2011), aes(x=pct_esp_vert_diff_2011.2019b750, y=gentrified_2016_2011)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2016_2011) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019b750, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019b750, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019b750 ~ gentrified_2016_2011, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2016_2011 1 133 133.34 10.88 0.00102 **
## Residuals 688 8432 12.26
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 15 observations deleted due to missingness
Measuring bike lane length change within CT/buffers (in meters) between 2011 and 2016 (and not between 2006 and 2011)
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2011_2006), aes(x=Bike_lane_diff.2011.2016ct, y=gentrified_2011_2006)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2011_2006) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016ct, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016ct, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016ct ~ gentrified_2011_2006, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2011_2006 1 227980 227980 0.208 0.648
## Residuals 674 738566819 1095796
## 29 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2011_2006), aes(x=Bike_lane_diff.2011.2016b250, y=gentrified_2011_2006)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2011_2006) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016b250, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016b250, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016b250 ~ gentrified_2011_2006, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2011_2006 1 1.097e+07 10973598 3.898 0.0487 *
## Residuals 674 1.897e+09 2815091
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 29 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2011_2006), aes(x=Bike_lane_diff.2011.2016b500, y=gentrified_2011_2006)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2011_2006) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016b500, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016b500, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016b500 ~ gentrified_2011_2006, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2011_2006 1 6.005e+07 60051961 10.51 0.00125 **
## Residuals 674 3.852e+09 5715401
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 29 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2011_2006), aes(x=Bike_lane_diff.2011.2016b750, y=gentrified_2011_2006)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2011_2006) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016b750, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016b750, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016b750 ~ gentrified_2011_2006, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2011_2006 1 2.429e+08 242939736 23.52 1.54e-06 ***
## Residuals 674 6.962e+09 10329115
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 29 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2011_2006), aes(x=pct_esp_vert_diff_2011.2019ct, y=gentrified_2011_2006)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2011_2006) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019ct, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019ct, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019ct ~ gentrified_2011_2006, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2011_2006 1 474 474.1 26.19 4.04e-07 ***
## Residuals 674 12202 18.1
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 29 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2011_2006), aes(x=pct_esp_vert_diff_2011.2019b250, y=gentrified_2011_2006)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2011_2006) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019b250, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019b250, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019b250 ~ gentrified_2011_2006, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2011_2006 1 418 417.5 29.07 9.64e-08 ***
## Residuals 674 9679 14.4
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 29 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2011_2006), aes(x=pct_esp_vert_diff_2011.2019b500, y=gentrified_2011_2006)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2011_2006) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019b500, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019b500, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019b500 ~ gentrified_2011_2006, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2011_2006 1 357 356.9 27.58 2.03e-07 ***
## Residuals 674 8722 12.9
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 29 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2011_2006), aes(x=pct_esp_vert_diff_2011.2019b750, y=gentrified_2011_2006)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2011_2006) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019b750, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019b750, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019b750 ~ gentrified_2011_2006, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2011_2006 1 314 314.16 25.82 4.86e-07 ***
## Residuals 674 8200 12.17
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 29 observations deleted due to missingness
Measuring bike lane length change within CT/buffers (in meters) between 2011 and 2016 (and not between 2001 and 2006)
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2006_2001), aes(x=Bike_lane_diff.2011.2016ct, y=gentrified_2006_2001)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2006_2001) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016ct, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016ct, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016ct ~ gentrified_2006_2001, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2006_2001 1 27515 27515 0.05 0.824
## Residuals 634 351091051 553771
## 69 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2006_2001), aes(x=Bike_lane_diff.2011.2016b250, y=gentrified_2006_2001)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2006_2001) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016b250, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016b250, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016b250 ~ gentrified_2006_2001, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2006_2001 1 2.192e+07 21920663 13.42 0.00027 ***
## Residuals 634 1.036e+09 1633304
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 69 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2006_2001), aes(x=Bike_lane_diff.2011.2016b500, y=gentrified_2006_2001)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2006_2001) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016b500, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016b500, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016b500 ~ gentrified_2006_2001, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2006_2001 1 1.139e+08 113920313 28.58 1.25e-07 ***
## Residuals 634 2.527e+09 3985549
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 69 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2006_2001), aes(x=Bike_lane_diff.2011.2016b750, y=gentrified_2006_2001)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2006_2001) %>%
summarise(
count = n(),
mean = mean(Bike_lane_diff.2011.2016b750, na.rm = TRUE),
sd = sd(Bike_lane_diff.2011.2016b750, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(Bike_lane_diff.2011.2016b750 ~ gentrified_2006_2001, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2006_2001 1 3.754e+08 375368237 46.86 1.8e-11 ***
## Residuals 634 5.079e+09 8010555
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 69 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2006_2001), aes(x=pct_esp_vert_diff_2011.2019ct, y=gentrified_2006_2001)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2006_2001) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019ct, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019ct, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019ct ~ gentrified_2006_2001, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2006_2001 1 277 277.15 16.69 4.97e-05 ***
## Residuals 634 10530 16.61
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 69 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2006_2001), aes(x=pct_esp_vert_diff_2011.2019b250, y=gentrified_2006_2001)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2006_2001) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019b250, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019b250, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019b250 ~ gentrified_2006_2001, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2006_2001 1 281 280.89 21.37 4.59e-06 ***
## Residuals 634 8333 13.14
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 69 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2006_2001), aes(x=pct_esp_vert_diff_2011.2019b500, y=gentrified_2006_2001)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2006_2001) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019b500, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019b500, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019b500 ~ gentrified_2006_2001, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2006_2001 1 245 244.66 20.61 6.74e-06 ***
## Residuals 634 7526 11.87
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 69 observations deleted due to missingness
ggplot(drop_na(units::drop_units(bei_df_aoi), gentrified_2006_2001), aes(x=pct_esp_vert_diff_2011.2019b750, y=gentrified_2006_2001)) +
geom_boxplot()
bei_df_aoi %>%
units::drop_units() %>%
drop_na() %>%
group_by(gentrified_2006_2001) %>%
summarise(
count = n(),
mean = mean(pct_esp_vert_diff_2011.2019b750, na.rm = TRUE),
sd = sd(pct_esp_vert_diff_2011.2019b750, na.rm = TRUE)
)
# Compute the analysis of variance
res.aov <- aov(pct_esp_vert_diff_2011.2019b750 ~ gentrified_2006_2001, data = units::drop_units(bei_df_aoi))
# Summary of the analysis
summary(res.aov)
## Df Sum Sq Mean Sq F value Pr(>F)
## gentrified_2006_2001 1 197 196.68 17.47 3.33e-05 ***
## Residuals 634 7139 11.26
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 69 observations deleted due to missingness